package com.xiaobange.entity;


import lombok.Data;

import java.io.Serializable;

/**
 * 宠物信息表
 * @TableName pet_info
 */
@Data
public class PetInfo implements Serializable {
    /**
     * id
     */
    private Integer petId;

    /**
     * 宠物主人ID
     */
    private Integer clientId;

    /**
     * 宠物名称
     */
    private String petName;

    /**
     * 宠物年龄
     */
    private Double petAge;

    /**
     * 宠物性别
     */
    private String petGender;

    /**
     * 宠物类别
     */
    private String petType;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PetInfo other = (PetInfo) that;
        return (this.getPetId() == null ? other.getPetId() == null : this.getPetId().equals(other.getPetId()))
            && (this.getClientId() == null ? other.getClientId() == null : this.getClientId().equals(other.getClientId()))
            && (this.getPetName() == null ? other.getPetName() == null : this.getPetName().equals(other.getPetName()))
            && (this.getPetAge() == null ? other.getPetAge() == null : this.getPetAge().equals(other.getPetAge()))
            && (this.getPetGender() == null ? other.getPetGender() == null : this.getPetGender().equals(other.getPetGender()))
            && (this.getPetType() == null ? other.getPetType() == null : this.getPetType().equals(other.getPetType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPetId() == null) ? 0 : getPetId().hashCode());
        result = prime * result + ((getClientId() == null) ? 0 : getClientId().hashCode());
        result = prime * result + ((getPetName() == null) ? 0 : getPetName().hashCode());
        result = prime * result + ((getPetAge() == null) ? 0 : getPetAge().hashCode());
        result = prime * result + ((getPetGender() == null) ? 0 : getPetGender().hashCode());
        result = prime * result + ((getPetType() == null) ? 0 : getPetType().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", petId=").append(petId);
        sb.append(", clientId=").append(clientId);
        sb.append(", petName=").append(petName);
        sb.append(", petAge=").append(petAge);
        sb.append(", petGender=").append(petGender);
        sb.append(", petType=").append(petType);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}